#include <sdk/stats.h>
#include "plant.h"
#include "Skills/base.h"
#include "Skills/typeEnergy.h"
#include "Skills/StatCheck.h"
#include "Skills/debugskill.h"
#include "Skills/Level.h"
#include "Skills/link.h"


entity::Plant::Plant() : Actor() {
    this->setName("Plant");
    this->properties["hp"] = "100";
    this->properties["max_hp"] = "100";
    this->properties["energy"] = "0";
    this->properties["attack"] = "100";
    this->properties["defense"] = "0";
    this->properties["team"] = "0";
    this->properties["dead"] = "false";
    this->properties["attack_range"] = "16";
    this->properties["transport_range"] = "16";
    this->properties["transport_capacity"] = "9999999";
    this->properties["efficiency"] = "1";
    this->properties["consumption"] = "0";
    this->properties["outdeg"] = "3";
    this->properties["link_in"] = "|";
    this->properties["link_out"] = "|";
    this->learnSkill(new skill::PlainAttack);
    this->learnSkill(new skill::Produce);
    this->learnSkill(new skill::Evolve);
    this->learnSkill(new skill::Vestigial);
    this->learnSkill(new skill::Shutdown);
    this->learnSkill(new skill::Connect);
    this->learnSkill(new skill::Link);
    this->learnSkill(new skill::Disconnect);
    this->learnSkill(new skill::Transfer);
    this->learnSkill(new skill::Split);
}


entity::BasePlant::BasePlant() : Plant() {
    this->setName("BasePlant");
    this->properties["type"] = "0";
    this->properties["level"] = "0";
    this->properties["hp"] = std::to_string(stats::getMaxHP(0, RawRobot));
    this->properties["energy"] = std::to_string(int(baseEnergy));
    this->learnSkill(new skill::ReCalculateStats);
    this->learnSkill(new skill::ValidateSkills);
    //this->unlearnSkill(this->skillList["Produce"]);
    this->learnSkill(new skill::AutoRecovery);
}

entity::TestPlant::TestPlant() : Plant() {
    this->setName("TestPlant");
    this->unlearnSkill(this->skillList["Produce"]);
    this->learnSkill(new skill::Refreash);
}
